<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <h2>switch语句</h2>
    <ul>
        <li>switch是选择语句</li>
        <li>根据表达式进入一个支路执行，会滑落执行。</li>
        <li>break关键字：用于跳出循环，可以阻止switch语句滑落执行</li>
    </ul>
</head>
<body>
    <script>
        let a = 3;
        switch (a) {
        case 1: console.log("中文");break;
        case 2: console.log("Englise");break;
        case 3: {
            console.log("日本語"); 
            break;
        }
        case 4: console.log("韩语"); break;
        default: console.log("未知语言"); break;
        }

        let month = 3;
        let day = 31;
        // 求出3月31日是今年的多少天，2月按28天计算（扩展：自己求闰年天数）
    </script>
</body>
</html>